#!/bin/sh

# Average Fitnes
gnuplot <<EOF
set terminal png size 500,200
set output "fitness.png"
#set terminal epslatex
#set output "modified_crossover.tex"
set xlabel "Generation"
set ylabel "Fitness"
set title "Fitness Behaviour"
#set xrange [ 0 : 20 ]
#set yrange [ 4650 : 5100 ]
#set mxtics 20
#set mytics 50
#set xtics 100
#set ytics 500
plot "average_fitness.dat" using 1:2 title "average fitnes" w filledcu y1=0 linecolor rgb "blue", \
     "max_fitness.dat" using 1:2 title "max fitnes" w lines linecolor rgb "red", \
     "min_fitness.dat" using 1:2 title "min fitness" w filledcu y1=0 linecolor rgb "yellow"
#plot "average_fitness.dat" every 5 using 1:2 title "average fitnes" w filledcu y1=0 linecolor rgb "blue", \
#     "max_fitness.dat" every 5 using 1:2 title "max fitnes" w lines linecolor rgb "red"
#     "min_fitness.dat" using 1:2 title "min fitness" w lines linecolor rgb "yellow"

EOF

